@extends('layouts.mobile')

@section('title', '精准扶贫')

@section('content')
    <style type="text/css">html,body{background-color: #f9f9f9;}</style>
    <div class="swiper-div" style="padding-top: 50%;">
        <div class="swiper" id="swiper">
            <ul class="swiper-wrapper">
                @foreach($focusImages as $img)
                    <li class="swiper-slide">
                        <a href="{{$img['url']}}">
                            <div class="bg bg-cover" style="background-image: url({{image_url($img['image'])}})"></div>
                        </a>
                    </li>
                @endforeach
            </ul>
            <div class="swiper-pagination"></div>
        </div>
    </div>
    <script type="text/javascript">
        (function(){
            var swiper = new Swiper('#swiper',
                {loop:true,pagination:'.swiper-pagination',autoplay:2500});
        })();
    </script>
    <div class="title-banner" style="background-image: url({{asset('images/mobile/common/jingxuan.jpg')}})"></div>

    <div class="swiper-div" style="padding-top: 50%; background-color: #fff;">
        <div class="swiper" id="swiper2">
            <ul class="swiper-wrapper">
                <li class="swiper-slide">
                    <div class="chaozhi">
                        @foreach ($jingxuan as $img)
                            <div class="item">
                                <a href="{{$img['url']}}">
                                    <div class="image bg-cover" style="background-image: url({{image_url($img['image'])}})"></div>
                                    <div class="title">{{$img['title']}}</div>
                                    <div class="price">￥{{$img['field_1']}}</div>
                                </a>
                            </div>
                            @if ($loop->iteration%3==0 && !$loop->last)
                    </div></li><li class="swiper-slide chaozhi"><div class="chaozhi">
                        @endif
                        @endforeach
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <script type="text/javascript">
        (function(){
            var swiper = new Swiper('#swiper2', {loop:true});
        })();
    </script>
    <div class="title-banner" style="background-image: url({{asset('images/mobile/common/5a589937N6aaeddc6.jpg')}})"></div>
    <div class="fupin-list">
        @foreach ($items as $item)
            <div class="item-info" data-link="{{mobile_item_url($item['itemid'])}}">
                <div class="image bg-cover" style="background-image: url({{image_url($item['image'])}})"></div>
                <div class="title">{{$item['title']}}</div>
                <div class="data">
                    <h3 class="price">￥{{$item['price']}}</h3>
                    <span class="sold">已售出{{$item['sold']}}</span>
                </div>
            </div>
        @endforeach
    </div>
@stop
